<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/materialdesignicons.min.css">
    <style>
        .nav {
            /* 子元素想要用弹性布局技术，父元素就要设置 */
            display: flex;

            /* 默认水平方向的排列规则，space-between就是zu最左边的在左边，最右边的在右边，剩余平均分 */
            justify-content: space-between;

            /* align-items就是默认垂直方向的排列规则 */
            align-items: center;

            width: 200%;
        }

        .nav .item {
            width: 19%;
            display: flex;

            /* 子元素默认垂直排列 */
            flex-direction: column;

            /* 如果是垂直排列，这个就会从垂直居中变成水平居中 */
            align-items: center;
            font-size: 14px;
        }

        .nav .item .mdi {
            font-size: 24px;
            align-items: center;
        }

        .wrapper {
            width: 100%;

            /* 超出自动出滚动条 */
            overflow: auto;
        }
    </style>
</head>

<body>
    <div class="wrapper">
        <div class="nav">
            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>
            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>
            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>
            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>

            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>
            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>
            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>
            <div class="item">
                <span class="mdi mdi-arrow-left"></span>
                首页
            </div>

        </div>
    </div>
</body>

</html>